package sguigu.threee.utils;

import com.sun.org.apache.bcel.internal.generic.NEW;

import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.ReentrantLock;

/**
 * @Author: jxm
 * @Description:
 * @Date: 2023/2/14 9:57
 * @Version: 1.0
 */
public class StudyDemo {

    public static void main(String[] args) {

//        HashMap<Object, Object> map = new HashMap<>();
//        map.put("K","V");
//
//        ConcurrentHashMap<Object, Object> concurrentHashMap = new ConcurrentHashMap<>();
//        concurrentHashMap.put("k","v");
//
//        ReentrantLock lock = new ReentrantLock();
//
//        Map<Object, Object> synchronizedMap = Collections.synchronizedMap(map);

//        ArrayList<Integer> list = new ArrayList<>();
//        list.add(2);
//        System.out.println(list.size());
//        list.set(1,5);
//
//        List<Integer> synchronizedList = Collections.synchronizedList(list);

//        ReentrantLock lock = new ReentrantLock(true);

        ThreadLocal<String> threadLocal = new ThreadLocal<>();
        threadLocal.set("hello");
        threadLocal.get();


    }
}
